Skip to content

chore(lint): enable errcheck and staticcheck#1774

Merged
AmanGIT07 merged 3 commits into
mainfrom
chore/enable-errcheck-linter
Jul 22, 2026
Merged

chore(lint): enable errcheck and staticcheck#1774
AmanGIT07 merged 3 commits into
mainfrom
chore/enable-errcheck-linter

Conversation

@AmanGIT07

@AmanGIT07 AmanGIT07 commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Enable the errcheck and staticcheck linters. All findings were fixed in the preceding PRs; this turns the gates on.

Changes

  • Add errcheck to linters.enable, plus the seventeen findings that lived in test files:
    • internal/api/v1beta1connect/authenticate_test.go: _ = on 12 JWK fixture calls (no t in scope inside the fixture closures); require.NoError on the json.Unmarshal that builds an expected value
    • internal/store/postgres/prospect_repository_test.go: assert the between-case s.cleanup() so a failed cleanup stops the suite at the real problem
    • pkg/server/webhook_bridge_test.go: _, _ = on two stub-handler writes
    • test/e2e/regression/authentication_test.go: nolint on the callback server shutdown defer
  • Add staticcheck to linters.enable with the golangci-lint default check set spelled out, minus the QF family (editor refactoring suggestions, not problems)
  • billing/checkout/service.go: drop an inferable type from a var declaration — the one outstanding staticcheck finding

Test Plan

  • golangci-lint run with both linters enabled and issue caps disabled reports zero findings
  • Build passes; affected test packages pass

@vercel

vercel Bot commented Jul 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
frontier Ready Ready Preview, Comment Jul 22, 2026 10:40am

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@AmanGIT07, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 35 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 26262dc0-93af-44a6-91a6-b231fd8e8e15

📥 Commits

Reviewing files that changed from the base of the PR and between f343052 and e730416.

📒 Files selected for processing (1)
  • test/e2e/regression/authentication_test.go
📝 Walkthrough

Walkthrough

The change enables errcheck and staticcheck, configures static analysis exclusions, and updates production and test code to address unchecked returns, test assertions, lint suppression, and inferred boolean typing.

Changes

Lint configuration and cleanup

Layer / File(s) Summary
Enable errcheck and staticcheck
.golangci.yml
Enables errcheck and staticcheck, with selected staticcheck IDs excluded.
Update test error handling
internal/api/v1beta1connect/authenticate_test.go, internal/store/postgres/prospect_repository_test.go, pkg/server/webhook_bridge_test.go, test/e2e/regression/authentication_test.go
Test code now explicitly discards or asserts returned errors and adds lint suppression for server shutdown.
Simplify checkout declaration
billing/checkout/service.go
Changes the adjustableQuantity declaration to inferred typing while retaining its initial value.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: rohilsurana

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coveralls

coveralls commented Jul 18, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 29912781046

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage remained the same at 46.275%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: 1 uncovered change across 1 file (0 of 1 lines covered, 0.0%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
billing/checkout/service.go 1 0 0.0%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 38602
Covered Lines: 17863
Line Coverage: 46.27%
Coverage Strength: 13.86 hits per line

💛 - Coveralls

@AmanGIT07
AmanGIT07 marked this pull request as ready for review July 22, 2026 10:15
Turn on errcheck in golangci and resolve the seventeen findings in test
files: blank-assign fixture setup calls without a test handle in scope,
and assert the ones that feed expected values or reset shared state.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 39e14f2b-1b9a-4a09-94ea-f5ccff6bfc79

📥 Commits

Reviewing files that changed from the base of the PR and between cfe2cf3 and 4c82e65.

📒 Files selected for processing (5)
  • .golangci.yml
  • internal/api/v1beta1connect/authenticate_test.go
  • internal/store/postgres/prospect_repository_test.go
  • pkg/server/webhook_bridge_test.go
  • test/e2e/regression/authentication_test.go

Comment thread internal/api/v1beta1connect/authenticate_test.go
Comment thread test/e2e/regression/authentication_test.go Outdated
Keep the golangci-lint default check set and drop the QF checks, which
are editor refactoring suggestions. Fix the one outstanding finding.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@AmanGIT07
AmanGIT07 force-pushed the chore/enable-errcheck-linter branch from 4c82e65 to f343052 Compare July 22, 2026 10:35
@AmanGIT07 AmanGIT07 changed the title chore(lint): enable errcheck and fix test-file findings chore(lint): enable errcheck and staticcheck Jul 22, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@AmanGIT07
AmanGIT07 enabled auto-merge (squash) July 22, 2026 10:40
@AmanGIT07
AmanGIT07 merged commit 10300ed into main Jul 22, 2026
8 checks passed
@AmanGIT07
AmanGIT07 deleted the chore/enable-errcheck-linter branch July 22, 2026 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants